package com.tencent.wxcloudrun.controller;

import com.tencent.wxcloudrun.config.ApiResponse;
import com.tencent.wxcloudrun.service.WxLoginService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Author yuyongkang
 * @Date 2025/9/18 11:30
 */
@RestController()
@Slf4j
public class UserController {

    @Resource
    private WxLoginService wxLoginService;


    @PostMapping(value = "/user/login")
    ApiResponse login(@RequestBody Map<String, Object> params){
        return wxLoginService.wxLogin(params);
    }

    @PostMapping(value = "/user/updateInfo")
    ApiResponse updateInfo(@RequestBody Map<String, Object> params){
        return wxLoginService.updateInfo(params);
    }
}
